<html>
<body>
<h1>Declarations</h1>

<p>Declarations are either global or local (to a process) and can
contain declarations of global clocks, bounded integers, constants and
channels (although local channels are useless). The syntax is
described by the grammar for <tt>Decl</tt>:</p>

<p>
<pre>
Declarations ::= (Decl ';')*

Decl ::= 'int' VIL
  | 'int' '[' CExpr ',' CExpr ']' VIL
  | 'clock' IL
  | 'chan' IL
  | 'urgent' 'chan' IL
  | 'const' ID CExpr

CExpr ::= NAT | ID | '(' CExpr ')'
  | CExpr OP CExpr | '-' CExpr
OP ::= '+' | '-' | '*' | '/'

IL  ::= ID (',' ID)*
VIL ::= VID (',' VID)*
VID ::= ID | ID := CExpr | ID '[' CExpr ']' 
</pre>
where <tt>ID</tt> in <tt>CExpr</tt> must be a defined constant.</p>

<h2>Examples:</h2>
<ul>
<li><tt>const a 1;</tt> - constant <tt>a</tt> with value 1.
<li><tt>int[0,1] b[8], c[4];</tt> - two boolean arrays <tt>b</tt>
  and </tt>c</tt>, with
  8 and 4 elements respectively.
<li><tt>int[0,100] a:=5;</tt> - an integer variable with the range 
  0,...,100 initialised to 5.
<li><tt>clock x, y;</tt> - two clocks <tt>x</tt> and <tt>y</tt>.
<li><tt>chan d;</tt> - a channel.
<li><tt>urgent chan e;</tt> - an urgent channel.
</ul>

</body>
</html>
